from django.urls import path, include
from rest_framework.routers import DefaultRouter

from apps.master.views import SerialNumberViewSet, CurrencyRateViewSet, DepartmentsViewSet, DepartmentAssignUserViewSet, \
    DepartmentAssignSerialNumViewSet, SerialNumberByUserViewSet, DepartmentsByUserViewSet, CurrencyViewSet

master_router = DefaultRouter()
master_router.register('serialnum', SerialNumberViewSet, 'Serial Number List')
master_router.register('serialnumbyuser', SerialNumberByUserViewSet, 'Serial Number By User List')
master_router.register('currency', CurrencyViewSet, 'Currency_List')
master_router.register('currencyrate', CurrencyRateViewSet, 'Currency Rate List')
master_router.register('department', DepartmentsViewSet, 'Departments List')
master_router.register('departmentbyuser', DepartmentsByUserViewSet, 'Departments By User List')

master_urlpatterns = [
    path('', include(master_router.urls)),
    path('department_assign_user/', DepartmentAssignUserViewSet.as_view()),
    path('department_assign_serialnum/', DepartmentAssignSerialNumViewSet.as_view()),
]
